package com.test.deencredit.analytics_deencredit.http_deencredit

import java.sql.DriverManager.println
import java.util.concurrent.BlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit


class HttpPoolExecutor_deencredit(
    corePoolSize_deencredit: Int,
    maximumPoolSize_deencredit: Int,
    keepAliveTime_deencredit: Long,
    unit_deencredit: TimeUnit?,
    workQueue_deencredit: BlockingQueue<Runnable>?
) : ThreadPoolExecutor(corePoolSize_deencredit, maximumPoolSize_deencredit, keepAliveTime_deencredit, unit_deencredit, workQueue_deencredit) {

    override fun beforeExecute(t: Thread?, r: Runnable?) {
        super.beforeExecute(t, r)
        println("线程：${t?.name} 准备执行")
    }

    override fun afterExecute(r: Runnable?, t: Throwable?) {
        super.afterExecute(r, t)
        println("线程：${Thread.currentThread().name} 执行结束")
    }

    override fun terminated() {
        super.terminated()
        println("线程：结束")
    }
}